package com.camp.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.camp.mapper.FacilityMapper;
import com.camp.domain.Facility;
import com.camp.service.IFacilityService;

/**
 * 设施Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-03
 */
@Service
public class FacilityServiceImpl implements IFacilityService 
{
    @Autowired
    private FacilityMapper facilityMapper;

    /**
     * 查询设施
     * 
     * @param facilityId 设施主键
     * @return 设施
     */
    @Override
    public Facility selectFacilityByFacilityId(String facilityId)
    {
        return facilityMapper.selectFacilityByFacilityId(facilityId);
    }

    /**
     * 查询设施列表
     * 
     * @param facility 设施
     * @return 设施
     */
    @Override
    public List<Facility> selectFacilityList(Facility facility)
    {
        return facilityMapper.selectFacilityList(facility);
    }

    /**
     * 新增设施
     * 
     * @param facility 设施
     * @return 结果
     */
    @Override
    public int insertFacility(Facility facility)
    {
        return facilityMapper.insertFacility(facility);
    }

    /**
     * 修改设施
     * 
     * @param facility 设施
     * @return 结果
     */
    @Override
    public int updateFacility(Facility facility)
    {
        return facilityMapper.updateFacility(facility);
    }

    /**
     * 批量删除设施
     * 
     * @param facilityIds 需要删除的设施主键
     * @return 结果
     */
    @Override
    public int deleteFacilityByFacilityIds(String[] facilityIds)
    {
        return facilityMapper.deleteFacilityByFacilityIds(facilityIds);
    }

    /**
     * 删除设施信息
     * 
     * @param facilityId 设施主键
     * @return 结果
     */
    @Override
    public int deleteFacilityByFacilityId(String facilityId)
    {
        return facilityMapper.deleteFacilityByFacilityId(facilityId);
    }
}
